package com.ruoyi.member.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.member.domain.MemberPointsLog;
import com.ruoyi.member.mapper.MemberPointsLogMapper;
import com.ruoyi.member.service.IMemberPointsLogService;

/**
 * 积分记录Service业务层处理
 * 
 * @author ruoyi
 */
@Service
public class MemberPointsLogServiceImpl implements IMemberPointsLogService {
    @Autowired
    private MemberPointsLogMapper memberPointsLogMapper;

    /**
     * 查询积分记录列表
     * 
     * @param memberPointsLog 积分记录信息
     * @return 积分记录集合
     */
    @Override
    public List<MemberPointsLog> selectMemberPointsLogList(MemberPointsLog memberPointsLog) {
        return memberPointsLogMapper.selectMemberPointsLogList(memberPointsLog);
    }

    /**
     * 查询会员积分记录列表
     * 
     * @param memberId 会员ID
     * @return 积分记录集合
     */
    @Override
    public List<MemberPointsLog> selectMemberPointsLogByMemberId(Long memberId) {
        return memberPointsLogMapper.selectMemberPointsLogByMemberId(memberId);
    }

    /**
     * 通过记录ID查询积分记录
     * 
     * @param logId 记录ID
     * @return 积分记录对象信息
     */
    @Override
    public MemberPointsLog selectMemberPointsLogById(Long logId) {
        return memberPointsLogMapper.selectMemberPointsLogById(logId);
    }

    /**
     * 新增积分记录
     * 
     * @param memberPointsLog 积分记录信息
     * @return 结果
     */
    @Override
    public int insertMemberPointsLog(MemberPointsLog memberPointsLog) {
        return memberPointsLogMapper.insertMemberPointsLog(memberPointsLog);
    }

    /**
     * 修改积分记录
     * 
     * @param memberPointsLog 积分记录信息
     * @return 结果
     */
    @Override
    public int updateMemberPointsLog(MemberPointsLog memberPointsLog) {
        return memberPointsLogMapper.updateMemberPointsLog(memberPointsLog);
    }

    /**
     * 删除积分记录信息
     * 
     * @param logId 记录ID
     * @return 结果
     */
    @Override
    public int deleteMemberPointsLogById(Long logId) {
        return memberPointsLogMapper.deleteMemberPointsLogById(logId);
    }

    /**
     * 批量删除积分记录信息
     * 
     * @param logIds 需要删除的记录ID
     * @return 结果
     */
    @Override
    public int deleteMemberPointsLogByIds(Long[] logIds) {
        return memberPointsLogMapper.deleteMemberPointsLogByIds(logIds);
    }

    /**
     * 清空会员积分记录
     * 
     * @param memberId 会员ID
     * @return 结果
     */
    @Override
    public int cleanMemberPointsLog(Long memberId) {
        return memberPointsLogMapper.cleanMemberPointsLog(memberId);
    }
} 